package com.yanu.t2s.mapper;

import com.yanu.t2s.entity.Pig;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface PigMapper {
    List<Pig> findByIDyangzhi(int iduser);
    List<Pig> findBYIDtuzai(int iduser);
    List<Pig> findAllPig();
    void insertpig(Pig pig);
    List<Pig> findPigsofoneyangzhi(int yangzhiid);
    //买一头猪分两个update语句，使用事物
    void buyonepig1(int pigid,int userid,double weight);
    void buyonepig2(int pigid,int userid,double weight);
}
